<?php
include APPPATH."views/frontend/inc/01_meta.php";
include APPPATH."views/frontend/inc/02_head.php";
include APPPATH."views/frontend/inc/04_slider.php";
?>

<script type="text/javascript" src="/libraries/validation-engine/jquery.validationEngine.js"></script>
<script type="text/javascript" src="/libraries/validation-engine/jquery.validationEngine-vi.js"></script>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
    var locations = [
        
      [
          'BÁNH YÊU', 
          10.792048,106.679982, 
          20,
          '8/18 Đường Lê Quý Đôn Phường 12, Quận Phú Nhuận Tp HCM',
          'Phone:(+84)982 636 618 - Ms Mai.<br/>Email: dongocmai179@yahoo.com-valikie.nhung@gmail.com'
      ]
    ];

    var map = new google.maps.Map(document.getElementById('map'), {
      zoom: 16,
      center: new google.maps.LatLng(10.792048,106.679982),
      mapTypeId: google.maps.MapTypeId.ROADMAP
    });

    var infowindow = new google.maps.InfoWindow();

    var marker, i;

    for (i = 0; i < locations.length; i++) {
        var icon ='http://banhyeu.com/images/marker-map-lv2.png';
        marker = new google.maps.Marker({
              title:locations[i][0],
              position: new google.maps.LatLng(locations[i][1], locations[i][2]),
              map: map,
              icon: icon
        });

        google.maps.event.addListener(marker, 'click', (function(marker, i) {
            var content_info ='\
              <div style="max-width:320px">\
                  <div><h4 style="margin:0;padding:4px 0;color:#ee4034">'+locations[i][0]+'</h4></div>\
                  <div><b>Đ/c :</b><i>'+locations[i][4]+'</i></div>\
                  <p>'+locations[i][5]+'</p>\
              </div>';
            return function() {
                infowindow.setContent(content_info);
                infowindow.open(map, marker);
            };
        })(marker, i));
    }
});
</script>
<div class="navi">
	<a href="/home">Trang chủ</a>
	<span>/</span>
	<span class="active">Liên hệ</span>
	<div class="clear"></div>
	<?php include APPPATH."views/frontend/inc/05_social.php"; ?>
</div>
<div class="container">
	<div class="-row" >
		<div class="col-sm-6">
			<div class="cake-news">
				<h3>ĐỊA CHỈ</h3>
				<div >
					<div style="position: relative;padding-bottom: 56%">
						<div id="map" style="position: absolute;top: 0;left: 0;width: 100%;height: 100%"></div>
					</div>
				</div>
				<h3>THÔNG TIN LIÊN HỆ</h3>
				<div >
					8/18 Đường Lê Quý Đôn Phường 12, Quận Phú Nhuận Tp HCM<br />
					Phone:(+84)982 636 618 - Ms Mai<br />
					Email: dongocmai179@yahoo.com<br />
					valikie.nhung@gmail.com<br />
					Follow on: Facebook<br />
				</div>
			</div>
		</div>
		<div class="col-sm-6">
			<div class="cake-news">
				<h3>LIÊN HỆ TRỰC TIẾP</h3>
					<div class="reg-form">
					<form name="frmcontactus" id="frmcontactus" -target="integration_asynchronous">
						<div>Họ và tên</div>
						<div class="input-group">
							<input type="text" 
								name="Name" data-putto=".error_name"
								class="form-control validate[required]" placeholder="Họ tên"
							>
							<div class="erb error_name"></div>
						</div>
						
						<div>Số điện thoại</div>
						<div class="input-group">
							<input type="text" class="form-control validate[required]" placeholder="Số điện thoại"
								name="Phone" data-putto=".error_phone"
							>
							<div class="erb error_phone"></div>
						</div>
						
						<div>Email</div>
						<div class="input-group">
							<input type="text" class="form-control validate[required]" placeholder="Email"
								name="Mail" data-putto=".error_mail"
							>
							<div class="erb error_mail"></div>
						</div>
						
						<!--
						<div class="input-group">
							<div class="dropdown">
								<a data-toggle="dropdown" href="#">Gender</a>
								<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
									<li><a href="JavaScript:" data-value="19">Female</a></li>
									<li><a href="JavaScript:" data-value="18">Male</a></li>
								</ul>
							</div>
						</div>
						-->
						
						<div>Nội dung</div>
						<div class="input-group">
							<textarea class="form-control validate[required]" 
							rows="3" name="Message"  data-putto=".error_message"
							placeholder="Nội dung" 
							></textarea>
							<div class="erb error_message"></div>
						</div>
						<div class="input-group">
							<button style="width: 100%" class="btn btn-default" type="button"
								onclick="newcontactus();"
							>GỬI</button>
						</div>
						<div id="contactus-message"></div>
					</form>
					</div>
			</div>
		</div>
		<div class="clear"></div>
	</div>
</div>
<?php
include APPPATH."views/frontend/inc/03_foot.php";
?>